Ubuntu 16.04
Sponsored Link

Install Clam AntiVirus
2016/04/21
 
Install Clam AntiVirus to protect server from virus.
[1] Install Clamav
root@dlp:~#
apt-get -y install clamav
root@dlp:~#
sed -i -e "s/^NotifyClamd/#NotifyClamd/g" /etc/clamav/freshclam.conf
# update pattern files

root@dlp:~#
freshclam

Downloading main.cvd [100%]
main.cvd updated (version: 57, sigs: 4218790, f-level: 60, builder: amishhammer)
Downloading daily.cvd [100%]
daily.cvd updated (version: 21502, sigs: 86257, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 277, sigs: 47, f-level: 63, builder: neo)
Database updated (4305094 signatures) from db.local.clamav.net (IP: 27.96.54.66)
[2] Try to scan.
root@dlp:~#
clamscan --infected --remove --recursive /home


----------- SCAN SUMMARY -----------
Known viruses: 4299710
Engine version: 0.99
Scanned directories: 5
Scanned files: 9
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.01 MB (ratio 0.00:1)
Time: 6.565 sec (0 m 6 s)

# download test virus

root@dlp:~#
wget http://www.eicar.org/download/eicar.com
root@dlp:~#
clamscan --infected --remove --recursive ./

./eicar.com: Eicar-Test-Signature FOUND
./eicar.com: Removed.    
# just detected
----------- SCAN SUMMARY -----------
Known viruses: 4299710
Engine version: 0.99
Scanned directories: 4
Scanned files: 6
Infected files: 1
Data scanned: 0.01 MB
Data read: 0.01 MB (ratio 0.67:1)
Time: 6.594 sec (0 m 6 s)
 
Tweet